#include <iostream>
#include <string>
// 包含SpireMS SDK头文件
#include <sms_core.h>
#include "sv2_aruco_det.h"


using namespace std;


const char* about = "FEIPad Detection Demo";
const char* keys  =
    "{@param_file |<none> | Aruco's parameters }"
    "{j           |live   | The node's job name }";


int main(int argc, char *argv[])
{
    cv::CommandLineParser parser(argc, argv, keys);
    parser.about(about);

    if(argc < 2) {
        parser.printMessage();
        return 0;
    }

    std::cout << "config: " << parser.get<std::string>(0) << std::endl;
    std::cout << "job_name: " << parser.get<std::string>("j") << std::endl;

    std::string job_name = parser.get<std::string>("j");;
    std::string config = parser.get<std::string>(0);

    sv2::ArucoDetCppNode node(job_name, config);
    node.start();
    node.join();
    return 0;
}
